#include "lvgl/lvgl.h"

/*******************************************************************************
 * Size: 16 px
 * Bpp: 4
 * Opts:
 ******************************************************************************/

#ifndef NUMBER_TEMP
#define NUMBER_TEMP 1
#endif

#if NUMBER_TEMP

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t gylph_bitmap_temp[] = {
    /* U+25 "%" */
    0x3, 0xcf, 0xb1, 0x0, 0x2, 0xf9, 0x0, 0xe,
    0xc7, 0xfa, 0x0, 0xa, 0xf1, 0x0, 0x5f, 0x20,
    0x7f, 0x0, 0x3f, 0x80, 0x0, 0x7f, 0x0, 0x5f,
    0x20, 0xbe, 0x0, 0x0, 0x6f, 0x10, 0x6f, 0x14,
    0xf6, 0x0, 0x0, 0x2f, 0x92, 0xdd, 0xd, 0xd0,
    0x0, 0x0, 0x7, 0xff, 0xe3, 0x6f, 0x50, 0x0,
    0x0, 0x0, 0x13, 0x0, 0xec, 0x8, 0xff, 0xa0,
    0x0, 0x0, 0x7, 0xf3, 0x5f, 0x87, 0xf7, 0x0,
    0x0, 0x1f, 0xa0, 0xae, 0x0, 0xcc, 0x0, 0x0,
    0x8f, 0x20, 0xbc, 0x0, 0xad, 0x0, 0x2, 0xf9,
    0x0, 0xad, 0x0, 0xbc, 0x0, 0xa, 0xf1, 0x0,
    0x4f, 0x65, 0xf6, 0x0, 0x3f, 0x70, 0x0, 0x7,
    0xee, 0x80,

    /* U+30 "0" */
    0x0, 0x2a, 0xef, 0xd6, 0x0, 0x1, 0xef, 0xdc,
    0xff, 0x80, 0xa, 0xf9, 0x0, 0x2e, 0xf2, 0xf,
    0xf1, 0x0, 0x8, 0xf8, 0x3f, 0xc0, 0x0, 0x4,
    0xfb, 0x4f, 0xb0, 0x0, 0x2, 0xfd, 0x5f, 0xa0,
    0x0, 0x2, 0xfd, 0x4f, 0xb0, 0x0, 0x2, 0xfd,
    0x3f, 0xc0, 0x0, 0x4, 0xfb, 0xf, 0xf1, 0x0,
    0x8, 0xf8, 0xa, 0xf9, 0x0, 0x2e, 0xf2, 0x1,
    0xef, 0xdc, 0xff, 0x80, 0x0, 0x2a, 0xef, 0xd6,
    0x0,

    /* U+31 "1" */
    0x0, 0x19, 0xfa, 0x7, 0xff, 0xfa, 0x1f, 0xeb,
    0xfa, 0x18, 0x16, 0xfa, 0x0, 0x6, 0xfa, 0x0,
    0x6, 0xfa, 0x0, 0x6, 0xfa, 0x0, 0x6, 0xfa,
    0x0, 0x6, 0xfa, 0x0, 0x6, 0xfa, 0x0, 0x6,
    0xfa, 0x0, 0x6, 0xfa, 0x0, 0x6, 0xfa,

    /* U+32 "2" */
    0x0, 0x3a, 0xef, 0xd7, 0x0, 0x3, 0xff, 0xdc,
    0xff, 0xa0, 0xa, 0xf5, 0x0, 0x2e, 0xf3, 0x0,
    0x50, 0x0, 0x9, 0xf7, 0x0, 0x0, 0x0, 0x9,
    0xf6, 0x0, 0x0, 0x0, 0x1e, 0xf1, 0x0, 0x0,
    0x0, 0xcf, 0x60, 0x0, 0x0, 0xc, 0xf8, 0x0,
    0x0, 0x1, 0xcf, 0x90, 0x0, 0x0, 0x1c, 0xf9,
    0x0, 0x0, 0x1, 0xdf, 0x90, 0x0, 0x0, 0xd,
    0xff, 0xbb, 0xbb, 0xb6, 0xf, 0xff, 0xff, 0xff,
    0xf9,

    /* U+33 "3" */
    0x5f, 0xff, 0xff, 0xff, 0x4, 0xbb, 0xbb, 0xef,
    0xc0, 0x0, 0x0, 0x5f, 0xb0, 0x0, 0x0, 0x7f,
    0x80, 0x0, 0x0, 0x9f, 0xe9, 0x30, 0x0, 0x7f,
    0xff, 0xff, 0x60, 0x0, 0x82, 0x6, 0xff, 0x20,
    0x0, 0x0, 0x9, 0xf7, 0x0, 0x0, 0x0, 0x6f,
    0x90, 0x60, 0x0, 0x7, 0xf8, 0xaf, 0x60, 0x2,
    0xef, 0x33, 0xff, 0xdc, 0xff, 0x90, 0x2, 0xae,
    0xfd, 0x60, 0x0,

    /* U+34 "4" */
    0x0, 0x0, 0x0, 0xcf, 0x20, 0x0, 0x0, 0x7,
    0xff, 0x20, 0x0, 0x0, 0x2f, 0xff, 0x20, 0x0,
    0x0, 0xdf, 0xdf, 0x20, 0x0, 0x8, 0xf5, 0xcf,
    0x20, 0x0, 0x3f, 0xa0, 0xcf, 0x20, 0x0, 0xde,
    0x10, 0xcf, 0x20, 0x9, 0xf5, 0x0, 0xcf, 0x20,
    0x3f, 0xfb, 0xbb, 0xff, 0xc9, 0x5f, 0xff, 0xff,
    0xff, 0xfd, 0x0, 0x0, 0x0, 0xcf, 0x20, 0x0,
    0x0, 0x0, 0xcf, 0x20, 0x0, 0x0, 0x0, 0xcf,
    0x20,

    /* U+35 "5" */
    0xa, 0xff, 0xff, 0xff, 0x10, 0xcf, 0xcb, 0xbb,
    0xb0, 0xe, 0xf0, 0x0, 0x0, 0x0, 0xfd, 0x0,
    0x0, 0x0, 0x2f, 0xc7, 0xa9, 0x30, 0x4, 0xff,
    0xff, 0xff, 0x60, 0x3d, 0xc2, 0x6, 0xff, 0x20,
    0x0, 0x0, 0x9, 0xf7, 0x0, 0x0, 0x0, 0x5f,
    0x90, 0x50, 0x0, 0x7, 0xf8, 0xaf, 0x50, 0x2,
    0xef, 0x33, 0xff, 0xdc, 0xff, 0x90, 0x2, 0xae,
    0xfc, 0x60, 0x0,

    /* U+36 "6" */
    0x0, 0x0, 0x1e, 0xf2, 0x0, 0x0, 0x0, 0xbf,
    0x50, 0x0, 0x0, 0x6, 0xf8, 0x0, 0x0, 0x0,
    0x2f, 0xb0, 0x0, 0x0, 0x0, 0xbf, 0x9a, 0x93,
    0x0, 0x4, 0xff, 0xff, 0xff, 0x60, 0xa, 0xfc,
    0x20, 0x6f, 0xf1, 0xf, 0xf1, 0x0, 0x9, 0xf6,
    0xf, 0xe0, 0x0, 0x6, 0xf8, 0xf, 0xf0, 0x0,
    0x8, 0xf7, 0xb, 0xf9, 0x0, 0x2e, 0xf2, 0x2,
    0xff, 0xdc, 0xff, 0x80, 0x0, 0x2a, 0xef, 0xc6,
    0x0,

    /* U+37 "7" */
    0xff, 0xff, 0xff, 0xff, 0x7b, 0xbb, 0xbb, 0xbd,
    0xf6, 0x0, 0x0, 0x0, 0xcf, 0x10, 0x0, 0x0,
    0x3f, 0xa0, 0x0, 0x0, 0x9, 0xf4, 0x0, 0x0,
    0x1, 0xfe, 0x0, 0x0, 0x0, 0x7f, 0x80, 0x0,
    0x0, 0xd, 0xf2, 0x0, 0x0, 0x4, 0xfb, 0x0,
    0x0, 0x0, 0xaf, 0x50, 0x0, 0x0, 0x1f, 0xf0,
    0x0, 0x0, 0x8, 0xf9, 0x0, 0x0, 0x0, 0xef,
    0x30, 0x0, 0x0,

    /* U+38 "8" */
    0x0, 0x2a, 0xef, 0xd7, 0x0, 0x2, 0xff, 0xb9,
    0xdf, 0xa0, 0x8, 0xf6, 0x0, 0xd, 0xf0, 0x8,
    0xf6, 0x0, 0xd, 0xf0, 0x1, 0xdf, 0xa8, 0xcf,
    0x70, 0x0, 0x8f, 0xff, 0xfe, 0x20, 0x7, 0xfb,
    0x20, 0x5f, 0xe1, 0xf, 0xe0, 0x0, 0x7, 0xf7,
    0x2f, 0xc0, 0x0, 0x3, 0xfa, 0x1f, 0xd0, 0x0,
    0x5, 0xf9, 0xc, 0xf6, 0x0, 0x1c, 0xf4, 0x3,
    0xff, 0xcb, 0xef, 0xa0, 0x0, 0x2a, 0xef, 0xd7,
    0x0,

    /* U+39 "9" */
    0x0, 0x2a, 0xef, 0xd6, 0x0, 0x3, 0xff, 0xdc,
    0xff, 0xa0, 0xc, 0xf7, 0x0, 0x1d, 0xf3, 0xf,
    0xf0, 0x0, 0x6, 0xf7, 0xf, 0xf0, 0x0, 0x7,
    0xf8, 0xb, 0xfa, 0x10, 0x4e, 0xf7, 0x2, 0xef,
    0xff, 0xff, 0xf2, 0x0, 0x17, 0xaa, 0xaf, 0xc0,
    0x0, 0x0, 0x1, 0xef, 0x40, 0x0, 0x0, 0xa,
    0xf9, 0x0, 0x0, 0x0, 0x5f, 0xe0, 0x0, 0x0,
    0x1, 0xef, 0x40, 0x0, 0x0, 0xb, 0xf9, 0x0,
    0x0,

    /* U+2103 "℃" */
    0x2, 0xbf, 0xe6, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0xd, 0xd6, 0x9f, 0x50, 0x0, 0x5c, 0xee,
    0xc6, 0x0, 0x4f, 0x30, 0xb, 0xb0, 0xa, 0xff,
    0xcc, 0xff, 0xa0, 0x5f, 0x10, 0x9, 0xc0, 0x8f,
    0xd2, 0x0, 0x2e, 0xf4, 0x1f, 0x90, 0x3e, 0x81,
    0xff, 0x20, 0x0, 0x4, 0x81, 0x6, 0xff, 0xfc,
    0x17, 0xfb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x25,
    0x40, 0xa, 0xf7, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0xc, 0xf5, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0xc, 0xf5, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0xa, 0xf6, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0xfa, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0xff,
    0x20, 0x0, 0x6, 0xb2, 0x0, 0x0, 0x0, 0x0,
    0x9f, 0xd2, 0x0, 0x2e, 0xf3, 0x0, 0x0, 0x0,
    0x0, 0xb, 0xff, 0xcc, 0xff, 0x90, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x6c, 0xfe, 0xc5, 0x0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc_temp[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 231, .box_w = 14, .box_h = 14, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 98, .adv_w = 168, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 163, .adv_w = 123, .box_w = 6, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 202, .adv_w = 168, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 267, .adv_w = 168, .box_w = 9, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 326, .adv_w = 168, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 391, .adv_w = 168, .box_w = 9, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 450, .adv_w = 168, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 515, .adv_w = 168, .box_w = 9, .box_h = 13, .ofs_x = 1, .ofs_y = -1},
    {.bitmap_index = 574, .adv_w = 168, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 639, .adv_w = 168, .box_w = 10, .box_h = 13, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 704, .adv_w = 292, .box_w = 18, .box_h = 15, .ofs_x = 0, .ofs_y = -2}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0_temp[] = {
    0x0, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11,
    0x12, 0x13, 0x14, 0x20de
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps_temp[] =
{
    {
        .range_start = 37, .range_length = 8415, .glyph_id_start = 1,
        .unicode_list = unicode_list_0_temp, .glyph_id_ofs_list = NULL, .list_length = 12, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

/*Store all the custom data of the font*/
static lv_font_fmt_txt_dsc_t font_dsc_temp = {
    .glyph_bitmap = gylph_bitmap_temp,
    .glyph_dsc = glyph_dsc_temp,
    .cmaps = cmaps_temp,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 4,
    .kern_classes = 0,
    .bitmap_format = 0
};


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
lv_font_t number_temp = {
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 15,          /*The maximum line height required by the font*/
    .base_line = 2,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0)
    .underline_position = -1,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc_temp           /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};



#endif /*#if NUMBER_TEMP*/

